package com.lzh.oop.bean;

public class Circle implements IShape {
    Point ptCenter;
    int radius;
    public Circle(Point point, int i) {
        ptCenter=point;
        radius=i;
    }

    @Override
    public double perimeter() {
        return 2*Math.PI*radius;
    }

    @Override
    public double area() {
        return Math.PI*radius*radius;
    }

    @Override
    public void draw() {
        System.out.println("绘制圆");
        System.out.println("圆心坐标："+ptCenter.getX()+","+ptCenter.getY());
        System.out.println("半径："+radius);
    }
}
